package org.hxd.dept.service;

import org.hxd.dept.dao.DeptDao;
import org.hxd.pojo.Dept;
import org.hxd.units.PageModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImol implements DeptService {
    @Resource
    DeptDao deptDao;
    @Override
    public List<Dept> findDept(PageModel pageModel, String name) {
        return deptDao.findDept(pageModel,name);
    }

    @Override
    public int findDeptCount(Dept dept) {
        return deptDao.findDeptCount(dept);
    }

    @Override
    public Dept findDeptByid(Integer id) {
        return deptDao.findDeptByid(id);
    }

    @Override
    public int modifyDept(Dept dept) {
        return deptDao.modifyDept(dept);
    }

    @Override
    public int addDept(Dept dept) {
        return deptDao.addDept(dept);
    }

    @Override
    public int removeDept(Integer[] ids) {
        return deptDao.removeDept(ids);
    }
}
